3.511 \(\int \frac{\sqrt{a+b x^2} (A+B x^2)}{x^2} \, dx\)

Optimal. Leaf size=84 \[ \frac{x \sqrt{a+b x^2} (a B+2 A b)}{2 a}+\frac{(a B+2 A b) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}-\frac{A \left (a+b x^2\right )^{3/2}}{a x} \]

[Out]

((2*A*b + a*B)*x*Sqrt[a + b*x^2])/(2*a) - (A*(a + b*x^2)^(3/2))/(a*x) + ((2*A*b + a*B)*ArcTanh[(Sqrt[b]*x)/Sqr
t[a + b*x^2]])/(2*Sqrt[b])

________________________________________________________________________________________

Rubi [A]  time = 0.0333191, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {453, 195, 217, 206} \[ \frac{x \sqrt{a+b x^2} (a B+2 A b)}{2 a}+\frac{(a B+2 A b) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}-\frac{A \left (a+b x^2\right )^{3/2}}{a x} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[a + b*x^2]*(A + B*x^2))/x^2,x]

[Out]

((2*A*b + a*B)*x*Sqrt[a + b*x^2])/(2*a) - (A*(a + b*x^2)^(3/2))/(a*x) + ((2*A*b + a*B)*ArcTanh[(Sqrt[b]*x)/Sqr
t[a + b*x^2]])/(2*Sqrt[b])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sqrt{a+b x^2} \left (A+B x^2\right )}{x^2} \, dx &=-\frac{A \left (a+b x^2\right )^{3/2}}{a x}-\frac{(-2 A b-a B) \int \sqrt{a+b x^2} \, dx}{a}\\ &=\frac{(2 A b+a B) x \sqrt{a+b x^2}}{2 a}-\frac{A \left (a+b x^2\right )^{3/2}}{a x}-\frac{1}{2} (-2 A b-a B) \int \frac{1}{\sqrt{a+b x^2}} \, dx\\ &=\frac{(2 A b+a B) x \sqrt{a+b x^2}}{2 a}-\frac{A \left (a+b x^2\right )^{3/2}}{a x}-\frac{1}{2} (-2 A b-a B) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )\\ &=\frac{(2 A b+a B) x \sqrt{a+b x^2}}{2 a}-\frac{A \left (a+b x^2\right )^{3/2}}{a x}+\frac{(2 A b+a B) \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}}\\ \end{align*}

Mathematica [A]  time = 0.148331, size = 71, normalized size = 0.85 \[ \frac{1}{2} \sqrt{a+b x^2} \left (\frac{(a B+2 A b) \sinh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{b} \sqrt{\frac{b x^2}{a}+1}}-\frac{2 A}{x}+B x\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[a + b*x^2]*(A + B*x^2))/x^2,x]

[Out]

(Sqrt[a + b*x^2]*((-2*A)/x + B*x + ((2*A*b + a*B)*ArcSinh[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[b]*Sqrt[1 + (b*x
^2)/a])))/2

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 93, normalized size = 1.1 \begin{align*}{\frac{Bx}{2}\sqrt{b{x}^{2}+a}}+{\frac{Ba}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-{\frac{A}{ax} \left ( b{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{Abx}{a}\sqrt{b{x}^{2}+a}}+A\sqrt{b}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)*(b*x^2+a)^(1/2)/x^2,x)

[Out]

1/2*x*B*(b*x^2+a)^(1/2)+1/2*B*a/b^(1/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))-A*(b*x^2+a)^(3/2)/a/x+A*b/a*x*(b*x^2+a)^
(1/2)+A*b^(1/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)*(b*x^2+a)^(1/2)/x^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.57556, size = 320, normalized size = 3.81 \begin{align*} \left [\frac{{\left (B a + 2 \, A b\right )} \sqrt{b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + 2 \,{\left (B b x^{2} - 2 \, A b\right )} \sqrt{b x^{2} + a}}{4 \, b x}, -\frac{{\left (B a + 2 \, A b\right )} \sqrt{-b} x \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) -{\left (B b x^{2} - 2 \, A b\right )} \sqrt{b x^{2} + a}}{2 \, b x}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)*(b*x^2+a)^(1/2)/x^2,x, algorithm="fricas")

[Out]

[1/4*((B*a + 2*A*b)*sqrt(b)*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*(B*b*x^2 - 2*A*b)*sqrt(b*x^2
 + a))/(b*x), -1/2*((B*a + 2*A*b)*sqrt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - (B*b*x^2 - 2*A*b)*sqrt(b*x^2
 + a))/(b*x)]

________________________________________________________________________________________

Sympy [A]  time = 3.4614, size = 107, normalized size = 1.27 \begin{align*} - \frac{A \sqrt{a}}{x \sqrt{1 + \frac{b x^{2}}{a}}} + A \sqrt{b} \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )} - \frac{A b x}{\sqrt{a} \sqrt{1 + \frac{b x^{2}}{a}}} + \frac{B \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2} + \frac{B a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 \sqrt{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)*(b*x**2+a)**(1/2)/x**2,x)

[Out]

-A*sqrt(a)/(x*sqrt(1 + b*x**2/a)) + A*sqrt(b)*asinh(sqrt(b)*x/sqrt(a)) - A*b*x/(sqrt(a)*sqrt(1 + b*x**2/a)) +
B*sqrt(a)*x*sqrt(1 + b*x**2/a)/2 + B*a*asinh(sqrt(b)*x/sqrt(a))/(2*sqrt(b))

________________________________________________________________________________________

Giac [A]  time = 1.13485, size = 113, normalized size = 1.35 \begin{align*} \frac{1}{2} \, \sqrt{b x^{2} + a} B x + \frac{2 \, A a \sqrt{b}}{{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2} - a} - \frac{{\left (B a \sqrt{b} + 2 \, A b^{\frac{3}{2}}\right )} \log \left ({\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2}\right )}{4 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)*(b*x^2+a)^(1/2)/x^2,x, algorithm="giac")

[Out]

1/2*sqrt(b*x^2 + a)*B*x + 2*A*a*sqrt(b)/((sqrt(b)*x - sqrt(b*x^2 + a))^2 - a) - 1/4*(B*a*sqrt(b) + 2*A*b^(3/2)
)*log((sqrt(b)*x - sqrt(b*x^2 + a))^2)/b